/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.alag.ci.impl;
import com.alag.ci.MetaDataVector;
import com.alag.ci.*;
import com.alag.ci.tagcloud.TagCloudElement;
import com.alag.ci.tagcloud.impl.TagCloudElementImpl;
import java.util.*;

/**
 *
 * @author sczbbx
 */
public class MetaDataVectorImpl implements MetaDataVector {
    
    private MetaDataVector child = null;
    private List<TagCloudElement> elements = null;
    
    public MetaDataVectorImpl(Map<String, Integer> keywordMap) {
        elements = new ArrayList<TagCloudElement>();
        Set<String> keys = keywordMap.keySet();
        for (String key: keys) {
            Integer count = keywordMap.get(key);
            elements.add(new TagCloudElementImpl(key, (double)count));
        }
    }

    public List<TagCloudElement> getTagMetaDataMagnitude() {
        return this.elements;
    }

    public MetaDataVector add(MetaDataVector other) {
        this.child = other;
        return this;
    }

    public MetaDataVector getChildVector() {
        return this.child;
    }
    
}
